package com.healthy.mapper;

import com.healthy.entity.Customertest;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface CustomertestMapper {
    @Select("select * from t_customertest")
    List<Customertest> culist();


    //    添加
    @Insert("insert into t_customertest (name, startime, endtime,content) values ( #{customerprofile.name}, #{customerprofile.startime}, #{customerprofile.endtime}, #{customerprofile.content})")
    int cuInsert(@Param("customerprofile") Customertest customertest);

    //删除
    @Delete("delete from t_customertest where id = #{id}")
    int cuDeleteByid(int id);

    //修改
    @Update("update t_customertest set name = #{name}, startime = #{startime}, endtime = #{endtime}, content = #{content} where id = #{id}")
    int cuUpdateByid(@Param("id") int id,@Param("name") String name,@Param("startime") String startime,@Param("endtime") String endtime,@Param("content") String content);
}
